﻿using LxBasic;
using LxCore;

namespace LxCore.Samples
{
    public class SampleVMBase : JsIdentifyItem
    {
        public SampleVMBase()
        {
            FileFolder = "D:\\CodeWorks\\Mesh";
        }
        public string FileFolder { get; set; }
        public string FileName { get; set; }
        protected void ReadFile()
        {
            LxSim.Sim.FileManage.ReadFile(string.Format($"{FileFolder}\\{FileName}"));
        }
        protected void RunSimulation()
        {
            LxSim.Sim.CalcManage.RunSimulation();
        }
        public virtual void RunCase()
        {

        }

        public FvZone? FindZone(string name)
        {
            return ResHelper.GetZone(name);
        }
        public FvBound? FindBound(FvZone inZone, string name)
        {
            return ResHelper.GetBound(inZone, name);
        }
        public FvJoint? FindJoint(string name)
        {
            return ResHelper.GetJoint(name);
        }

    }


}
